package com.dm.biz.base.controller;

import com.dm.biz.base.pojo.DmImage;
import com.dm.biz.base.service.DmImageService;
import com.dm.comm.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/dmImage")
@CrossOrigin
public class DmImageController {

    @Resource
    private DmImageService dmImageService;

    @GetMapping("/query/{targetId}/{category}/{type}")
    public Result<List<DmImage>> query(@PathVariable Long targetId,@PathVariable Long category,@PathVariable Long type){
      List<DmImage> list=  dmImageService.search(targetId, category, type);
      return Result.success("查询图片列表成功!",list);
    }


}
